package yg.engine;

import android.opengl.GLSurfaceView;
import android.content.Context;
import android.view.KeyEvent;
import android.view.MotionEvent;

public class YGView extends GLSurfaceView
{

	public YGView(Context context) 
	{
		super(context);
		m_Renderer = new YGRenderer();
		setRenderer(m_Renderer);
    	}
    	
    	public void onSizeChanged (int w, int h, int oldw, int oldh)
    	{
    		System.out.println("YGView: onSizeChanged (" + w + ", " + h + ") (" + oldw + ", " + oldh + ")");
    	}
   
	public boolean onTouchEvent(final MotionEvent event) 
	{
		if (event.getAction() == MotionEvent.ACTION_DOWN) 
		{
			NativePause();
		}
		return true;
	}
	
	public YGRenderer getRenderer() 
	{ 
		return m_Renderer; 
	}

	private YGRenderer m_Renderer;

	private native void NativePause();
	
}